# -*- coding:utf-8 -*-
from PySide6.QtWidgets import (QVBoxLayout, QTextEdit, QGroupBox)

class LogGroup(QGroupBox):
    def __init__(self):
        """
        日志显示组件
        """
        super().__init__("日志输出")
        log_layout = QVBoxLayout()
        self.log_view = QTextEdit()
        self.log_view.setReadOnly(True)
        log_layout.addWidget(self.log_view)
        self.setLayout(log_layout)

    def set_language(self, lang_data):
        """设置语言"""
        self.setTitle(lang_data.get("log_title", "日志输出"))